Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix hue for rgb colors if saturation was zero #2135

Merged
merged 1 commit into from
Aug 3, 2016

Conversation

mgreter
Copy link
Contributor

@mgreter mgreter commented Aug 3, 2016

If saturation is exacly zero, we loose information for hue,
since it will evaluate to zero if converted back from rgb.
Setting saturation to a very tiny number solves this.

Sass spec PR: sass/sass-spec#885

test {
  hue: hue(hsl(50, 0%, 30%));
  hue: hue(hsl(100, 0%, 80%));
}

If saturation is exacly zero, we loose information for hue,
since it will evaluate to zero if converted back from rgb.
Setting saturation to a very tiny number solves this.
@mgreter mgreter force-pushed the bugfix/rgb-hue-from-zero-saturation branch from e0b5b13 to 9adf7b7 Compare August 3, 2016 14:24
@coveralls
Copy link

coveralls commented Aug 3, 2016

Coverage Status

Coverage increased (+0.001%) to 79.096% when pulling 9adf7b7 on mgreter:bugfix/rgb-hue-from-zero-saturation into a728565 on sass:master.

@mgreter mgreter self-assigned this Aug 3, 2016
@mgreter mgreter added this to the 3.3.7 milestone Aug 3, 2016
@mgreter mgreter merged commit 55c0858 into sass:master Aug 3, 2016
@xzyfer xzyfer mentioned this pull request Sep 7, 2016
@xzyfer xzyfer modified the milestones: 3.3.7, 3.4 Oct 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants